package com.javafx.simple.demo.controller;

import com.javafx.simple.demo.LoginApplication;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;

import java.io.IOException;

/**
 * 登录控制器
 */
public class LoginController {

    @FXML
    private Label welcomeText;

    @FXML
    protected void onLoginClick() throws IOException {

        System.out.println("进入首页界面");

        FXMLLoader fxmlLoader = new FXMLLoader(LoginApplication.class.getResource("index.fxml"));
        Scene scene = new Scene(fxmlLoader.load(), 320, 240);

        Stage stage = new Stage();
        stage.setTitle("首页");
        stage.setScene(scene);
        stage.show();

    }
}
